<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ezcomp="http://java.sun.com/jsf/composite/ezcomp">

    <!--style type="text/css">
        .canc{
            background-image: url("../resources/images/ajax_small.gif");
        }        
    </style--> 

    <body>

        <ui:composition template="../plantilla/Plantilla_1.xhtml">

            <ui:define name="top">
                <ui:include src="../plantilla/top.xhtml" />
            </ui:define>    

            <ui:define name="left">
                <ui:include src="../plantilla/left.xhtml" />
            </ui:define>

            <ui:define name="content">

                <table width="547" border="0" cellspacing="0" cellpadding="0" background="../resources/images/3_26.gif" align="center">
                    <tr>
                        <td width="360" valign="top"> 
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="background-image:url(../resources/images/3_121.gif)" width="279" height="41">
                                        <center><b><h:outputText style="color: #ffffff; font-size: 13px" value="Partida de diario"/></b></center>
                                        <!--width="279" height="41" alt=""/-->
                                    </td>
                                </tr>
                                <tr>
                                    <td><img src="../resources/images/3_15.jpg" width="279" height="38" alt=""/></td>
                                </tr>
                            </table>
                            <table width="279" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="12"></td>
                                    <td width="255"><div align="justify"><span class="main">            

                                                <br/>                                          


                                            </span></div></td>
                                    <td width="12"></td>
                                </tr>
                            </table>
                        </td>
                        <td width="187" valign="top"><img src="../resources/images/3_13.jpg" width="268" height="230" alt=""/></td>
                    </tr>
                    <tr>                                                             


                        <td colspan="2">

                            <table  border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="12"></td>
                                    <td><div align="justify"><span class="main">   
                                                
<script type="text/Javascript">
function soloLetras(e) {
    key = e.keyCode || e.which;
    tecla = String.fromCharCode(key).toLowerCase();
    letras = "áéíóúabcdefghijklmnñopqrstuvwxyz";
    especiales = [8, 37, 39, 46];

    tecla_especial = false
    for(var i in especiales) {
        if(key == especiales[i]) {
            tecla_especial = true;
            break;
        }
    }

    if( letras.indexOf(tecla) == -1 || tecla_especial)
        return false;
}

function soloNumeros(a) {
    key = a.keyCode || a.which;
    tecla = String.fromCharCode(key).toLowerCase();
    letras = "1234567890";
    especiales = [8, 37, 39, 46];

    tecla_especial = false
    for(var i in especiales) {
        if(key == especiales[i]) {
            tecla_especial = true;
            break;
        }
    }

    if( letras.indexOf(tecla) == -1 || tecla_especial)
        return false;
}

</script>
                                                

                                                <p:growl id="growl" showDetail="true" />  

                                                <p:fieldset legend="&nbsp;" toggleable="true" toggleSpeed="500">  
                                                    <p:ajax event="toggle" update="growl" />          

                                                    <p:messages id="messages" />  
                                                    <p:panelGrid id="panel2" columns="2" style="width: 500px">  
                                                        <f:facet name="header">  
                                                            Partida de diario  
                                                        </f:facet>  


                                                        <h:outputLabel for="codigo" value="Código:" />  
                                                        <p:commandButton id="iconOnly3" onclick="dl_catalogo.show();" icon="ui-icon-search" style="margin-left: 3px">
                                                            <p:inputText id="codigo" value="" size="10" required="true" label="Código" onkeypress="return soloNumeros(event,'a')"/>  
                                                        </p:commandButton>
                                                        

                                                        <h:outputLabel for="cuenta" value="Cuenta:" />  
                                                        <p:inputText id="cuenta" value="" size="40" required="true" label="Cuenta" onkeypress="return soloLetras(event,'e')"/>  
                                                        <h:outputLabel for="cantidad" value="Cantidad:" />  
                                                        <p:inputText id="cantidad" value="" size="10" required="true" label="Cantidad" onkeypress="return soloNumeros(event,'a')"/>  


                                                        <f:facet name="footer">  
                                                            <p:row>
                                                                <p:column style="text-align: center">
                                                                    <p:commandButton id="btn_save" type="button" value="Cargar" style="margin:0"/>
                                                                    <p:commandButton type="button" value="Abonar" style="margin:0"/>
                                                                </p:column>
                                                            </p:row>
                                                        </f:facet>  
                                                    </p:panelGrid>          

                                                </p:fieldset>      

                                                <br/>
                                                <p:growl id="grow2" showDetail="true" />  

                                                <p:fieldset legend="&nbsp;" toggleable="true" toggleSpeed="500">                                                   

                                                    <p:ajax event="toggle" update="grow2" />          
                                                    <p:panelGrid>          
                                                        <f:facet name="footer">  
                                                            <p:row>
                                                                <p:column style="text-align: left">
                                                                    <h:outputLabel for="numero" value="No de partida: " /><p:inputText id="codigo1" value="" label="No de partida" size="2" />
                                                                </p:column>
                                                                <p:column style="text-align: left">                                                                                                                                             
                                                                    <h:outputLabel for="fecha" value="Fecha: " />
                                                                    <p:calendar locale="tr" showButtonPanel="true" navigator="true" id="trCal" size="6"/>            
                                                                </p:column>
                                                            </p:row>
                                                        </f:facet>  
                                                    </p:panelGrid>          

                                                    <p:dataTable var="car" value="">



                                                        <p:column>
                                                            <f:facet name="header">
                                                                <h:outputText value="Codigo" />
                                                            </f:facet>
                                                            <h:outputText value="110101" /><br/>
                                                            <h:outputText value="210102" />
                                                        </p:column>
                                                        <p:column>
                                                            <f:facet name="header">
                                                                <h:outputText value="Cuenta" />
                                                            </f:facet>
                                                            <h:outputText value="Caja" /><br/>
                                                            <h:outputText value="Proveedores" />
                                                        </p:column>
                                                        <p:column>
                                                            <f:facet name="header">
                                                                <h:outputText value="Debe" />
                                                            </f:facet>
                                                            <h:outputText value="500.00" /><br/>
                                                            <h:outputText value="0.00" />
                                                        </p:column>
                                                        <p:column>
                                                            <f:facet name="header">
                                                                <h:outputText value="Haber" />
                                                            </f:facet>
                                                            <h:outputText value="0.00"/><br/>
                                                            <h:outputText value="500.00" />
                                                        </p:column>       
                                                    </p:dataTable>

                                                    <p:panelGrid id="panel1" columns="2" style="width: 500px">  
                                                        <f:facet name="header">          
                                                        </f:facet>              
                                                        <f:facet name="footer">  
                                                            <p:row>
                                                                <p:column style="text-align: center">
                                                                    <h:outputText value="Comentario: "/>
                                                                    <p:inputText size="60" id="comentario"/><br/><br/>
                                                                    <p:commandButton id="btn_guardar" type="button" value="Guardar" icon="ui-icon-disk" style="margin:0"/>
                                                                    <p:commandButton type="button" value="Cancelar" icon="ui-icon-cancel" style="margin:0"/>
                                                                </p:column>
                                                            </p:row>
                                                        </f:facet>  
                                                    </p:panelGrid>                                  


                                                </p:fieldset>     
                                            </span></div></td>
                                    <td width="12" height="154">&nbsp;</td>
                                </tr>
                            </table>

                        </td>
                    </tr>
                    <tr><td colspan="2">
                            <img   src="../resources/images/3_30.gif" width="547" height="40" alt=""/></td></tr>  
                </table>             
                <!--div style="height: 520px"></div-->
                
                <p:dialog id="modalDialogBuscar" style="text-align: left!important" appendToBody="true" header="Buscar cuenta de catálogo" widgetVar="dl_catalogo" modal="true" resizable="false"
                          showEffect="clip" hideEffect="fold">  
                    <ezcomp:catalogoComposite /> 
                    <h:outputLabel for="buscar" value="Buscar:  " />  
                    <p:inputText id="buscar" value="" label="Buscar: " size="15" />&nbsp;
                    <p:commandButton type="button" value="Buscar" icon="ui-icon-search"/>
                </p:dialog>
                
            </ui:define>

            <ui:define name="bottom">
                <ui:include src="../plantilla/bottom.xhtml" />                
            </ui:define>
        </ui:composition>
    </body>
</html>
